package com.tskj.mh.getordertime.controller;

import com.alibaba.fastjson.JSONObject;
import com.tskj.mh.getordertime.service.GetOrderTimeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
public class GetOrderTimeController {

    @Autowired
    private GetOrderTimeService getOrderTimeService;

    @GetMapping("timeList")
    @ResponseBody
    public JSONObject getTimeList(@RequestParam String resId, @RequestParam String timeTypeId) {
        JSONObject ret = new JSONObject();
        ret.put("code", 0);
        ret.put("data", getOrderTimeService.getTimeList(resId, timeTypeId));
        return ret;
    }
}
